{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from __future__ import division, print_function\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Quantifying spinal cord regeneration in zebrafish\n",
    "\n",
    "We want to quantify the amount of fluorescent cells in a wounded zebrafish embryo spinal column:\n",
    "\n",
    "<img src=\"images/zebrafish-spinal-cord-color.png\" alt=\"Zebrafish spinal cord\" style=\"width: 300px;\"/>\n",
    "\n",
    "The key steps are:\n",
    "\n",
    "- estimating the position and width of the cord\n",
    "- estimating the average fluorescence along the length of the cord"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "from matplotlib import pyplot as plt, cm\n",
    "from skimage import io\n",
    "image = io.imread('images/zebrafish-spinal-cord.png')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# SciPy to estimate coordinates\n",
    "\n",
    "First, we get just the top and bottom rows of pixels, and use a 1D gaussian filter to smooth the signal."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.text.Text at 0x1096a3090>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": [
       "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\n"
      ],
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10855af90>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from scipy import ndimage as nd\n",
    "top, bottom = image[[0, -1], :]\n",
    "\n",
    "fig, (ax0, ax1) = plt.subplots(nrows=1, ncols=2, figsize=(8, 3))\n",
    "\n",
    "top_smooth = nd.gaussian_filter1d(top, sigma=20)\n",
    "ax0.plot(top, color='blue', lw=2)\n",
    "ax0.plot(top_smooth, color='orange', lw=2)\n",
    "ax0.set_title('top')\n",
    "\n",
    "bottom_smooth = nd.gaussian_filter1d(bottom, sigma=20)\n",
    "ax1.plot(bottom, color='blue', lw=2)\n",
    "ax1.plot(bottom_smooth, color='orange', lw=2)\n",
    "ax1.set_title('bottom')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "With smooth curves, we can get the mode (the position of the center) and width of the signal."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(421, 181, 739, 142)\n"
     ]
    }
   ],
   "source": [
    "top_mode = top_smooth.argmax()\n",
    "top_max = top_smooth[top_mode]\n",
    "top_width = (top_smooth > float(top_max) / 2).sum()\n",
    "\n",
    "bottom_mode = bottom_smooth.argmax()\n",
    "bottom_max = bottom_smooth[bottom_mode]\n",
    "bottom_width = (bottom_smooth > float(bottom_max) / 2).sum()\n",
    "\n",
    "width = max(bottom_width, top_width)\n",
    "\n",
    "print(top_mode, top_width, bottom_mode, bottom_width)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# scikit-image to trace the profile\n",
    "\n",
    "Now, use `measure.profile_line` to trace from (0, `top_mode`) to (-1, `bottom_mode`)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "from skimage import measure\n",
    "trace = measure.profile_line(image, (0, top_mode),\n",
    "                             (image.shape[0] - 1, bottom_mode),\n",
    "                             linewidth=width,\n",
    "                             mode='reflect')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Finally, plot the trace."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.text.Text at 0x10a9fa0d0>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": [
       "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\n",
       "uNItyqPze3I7k2Qisnn33Xd55513qFixIqGhoQVmUF7//v1ZtmwZwcHBbN++nbJlyxodknBRzkwm\n",
       "O4E2+T2RE0gyEdkkJSXRvn179uzZA8D48eN5+eWXqV69usGROc7OnTt56KGH8PPzIzIyskB3QBC5\n",
       "c2Yy6YKatXcjYFpjVQOW5/fkdibJRFiVkJBAjx492L59u7msWbNmjB49mieffJLChQsbGJ39PfTQ\n",
       "Q+zcuZM333yT999/3+hwhItzZjJZgJpK5RiZb3ONzO/J7UySichRamoqq1atYs6cOaxZs8Zc3qVL\n",
       "F3777TePWTY4Li6OatWq4efnx8WLFylevLjRIQkX58yuwc1RjfAjUAnE9BDCbfj6+tKvXz9Wr17N\n",
       "sWPH6N27NwDr169n1qz8Ls/jOlasULMQPfLII5JIhFPZkkx2oRamEsIjBAcHs2LFCn799VcAPvzw\n",
       "Q27dumVwVPaxfLm6+yxTyQtns6VqEwHUQs30e1svk67Bwu1pmkbTpk05fPgw33zzjXn9FHd16dIl\n",
       "KleujJeXF/Hx8ZQpU8bokIQbcOZtrq6omXq7AD31R6/8nlgIo3l5efHaa68B8PHHH5Oenp7LJ1zb\n",
       "qlWrSEtLo2PHjpJIhNPZkkyic3gI4fYef/xxgoKCiIqKcuulgTVN4/vvvwegX79+BkcjCiJb14AX\n",
       "wiP5+vry7LPPAvD1118bHE3erVy5kl27dlGhQgUGDhxodDiiAJK5uUSBd+HCBapVq4amaURHR7vd\n",
       "IL8bN25Qv359YmJimDlzJi+++KLRIQk34sw2EyE8WqVKlejXrx9paWl89913Rodz195++21iYmJo\n",
       "2rQpzz3naitDiIJCaiZCAFu3biUkJISSJUty8uRJKlWqZHRIuUpKSmLw4MGsWLECb29vtm7dKotd\n",
       "ibsmNRMh7Khdu3Z069aNhISETKsRuqpVq1ZRrFgx8yDF+fPnSyIRhpKaiRC60NBQ2rdvj6+vL8eO\n",
       "HaNOnTpGh2TV0aNHeeCBB7hx4waBgYHMnz+fhx9+2OiwhJvyhJqJD2pd+dX667LABtSU9+uB0hb7\n",
       "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\n",
       "AAAASUVORK5CYII=\n"
      ],
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10a875ad0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(trace, color='black', lw=2)\n",
    "plt.xlabel('position along embryo')\n",
    "plt.ylabel('mean fluorescence intensity')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "From this trace, we can compute various summary statistics (e.g. min/max, gap width, slope, etc), and plot these over time as the wound recovers."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.4.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
